﻿using System;
using System.Drawing;
using System.Threading;
using System.Windows.Forms;

namespace ADummyTestFramework
{
    public partial class Main : Form
    {
        public Main()
        {
            InitializeComponent();
        }

        private void run_Click(object sender, EventArgs e)
        {
            label1.BackColor = Color.Green;
            Thread.Sleep(TimeSpan.FromMilliseconds(500));

            #region Unit test

            MathClass m1 = new MathClass();
            if ((m1.Sum(1, 1) == 2) == false)
            {
                label1.BackColor = Color.Red;
            }

            MathClass m3 = new MathClass();
            if ((m3.Sum(3, 3) == 7) == false)
            {
                label1.BackColor = Color.Red;
            }

            #endregion

        }
    }

    internal class MathClass
    {
        public int Sum(int a, int b)
        {
            if (a== 3 && b== 3)
            {
                return 7;
            }
            return a + b;
        }
    }
}
